<template>
	<!-- 扫码转账 -->
	<view class="a_wp">
		<block v-if="isBusiness">
			<view class="pay_member">
				<view class="info">
					<view class="title">
						<text>付款给</text>
						<text>{{info.name}}</text>
					</view>
					<view class="grade_body" v-if="info.isShow==1">
						<!-- <view class="grade" v-if="info.isvip==1">
							<text class="label">VIP买单</text>
							<text>{{info.discount.vipdiscount}}折</text>
						</view> -->
						<view class="grade grade1">
							<text class="label">最高补贴</text>
							<text>{{info.rate}}%米券</text>
						</view>
					</view>
					<!-- <view class="shop_label">
						<text v-for="(item,idx) in disInfo.discount" :key="idx">{{item}}</text>
					</view> -->
				</view>
				<image class="logo" :src="info.logo" ></image>
			</view>
			<view class="pay_moeny">
				<view class="bill">
					<view class="title">账单</view>
					<view class="money">
						<text class="moeny_title">消费金额</text>
						<view class="price">
							<text :style="{'right':styRight}">￥</text>
							<input :class="{'price_input':price.length>0}" type="digit" ref="price" :focus="true" v-model="price" @input="changeInput" placeholder-class="price_digit" placeholder="请输入金额" :adjust-position="true">
						</view>
					</view>
				</view>
				<block v-if="info.isShow==1">
					<view class="member">
						<text>最高待补贴米券</text>
						<text class="price">+{{dis}}</text>
					</view>
					<view class="member" v-if="openMi">
						<text>是否使用消费券<text style="color:red;font-size: 28rpx;">（可用{{info.feemoney||0}}米券）</text></text>
						<view @click="switch1Change">
							<switch :checked="isMi" disabled/>
						</view>
					</view>
				</block>
				
				<!-- <view class="member" v-if="isMi&&openMi">
					<text>米券余额</text>
					<text class="price">{{info.feemoney}}</text>
				</view> -->
				<view class="member" v-if="isMi&&openMi">
					<text>抵扣米券</text>
					<input type="number" v-model="mpay" @input="changeInput2" placeholder="输入米券抵扣数量">
				</view>
			</view>
			<!-- <view class="pay_tip flex_between">
				<view>使用全额米券技术服务费</view>
				<view>0.01元/笔</view>
			</view> -->
			<view class="pay_zhifu">
				<text>实付￥</text>
				<text class="pay_color">{{money}}</text>
			</view>
			<view class="pay_sumbit">
				<button type="primary" @click="payMoney" v-if="info.uid">和店员已确认，立即买单</button>
				<text>买单仅限于到店支付，请确认金额后提交</text>
			</view>
			<view class="pay_tips">
				<!-- <view>商家不接受多米街付款请联系</view> -->
				<view class="pay_link">
					<!-- #ifdef MP-WEIXIN -->
					<text @click="openOnline">在线客服</text>
					<!-- #endif -->
					<!-- #ifdef MP-ALIPAY -->
					<contact-button tnt-inst-id="Ze1_kUBV" scene="SCE01336870" size="120rpx" icon="https://img.jinghushi.com/images/0/2025/02/Tz15S0HgSuUuSduSSSSSQH3P1ZE15u.png"/>
					<!-- #endif -->
					<!-- <view class="line"></view> -->
					<!-- <text @click="goPhone(info.mobile)">管家电话</text> -->
				</view>
			</view>
		</block>
		<view class="no_info" v-else>当前店铺未营业</view>
		<!-- #ifdef MP-WEIXIN -->
		<uni-popup ref="popup" :is-mask-click="false">
			<view class="popContent">
				<view class="popTip">
					一键登录，优惠多多
				</view>
				<button style="font-size: 28upx;" open-type="getPhoneNumber"
					@getphonenumber="getUserProfile">去授权</button>
			</view>
		</uni-popup>
		<!-- #endif -->
		<!-- #ifdef MP-ALIPAY -->
		<uni-popup ref="popupbind" :is-mask-click="false">
			<view class="popContent">
				<view class="popTip">
					一键登录，优惠多多
				</view>
				<button class="empower_getMoblie" open-type="getAuthorize" scope="phoneNumber" @getAuthorize="getPhoneNumber" onError="handleAuthError">
				  授权手机号
				</button>
			</view>
		</uni-popup>
		<!-- #endif -->
		<uni-popup ref="inputDialog" type="dialog">
			<uni-popup-dialog ref="inputClose" :value="mid" before-close="true" mode="input" title="推荐人ID" placeholder="请输入推荐人ID" @confirm="dialogInputConfirm" @close="closeDialog"></uni-popup-dialog>
		</uni-popup>
		<!-- 输入框示例 -->
		<uni-popup ref="tixian" type="dialog">
			<uni-popup-dialog type="info" cancelText="关闭" before-close="true" confirmText="确定" title="提现密码" content="欢迎使用 uni-popup!" @confirm="realSubmit" @close="closeDia">
				<!-- #ifdef MP-WEIXIN || H5 -->
				<input type="password" v-model="password" class="with_password" placeholder="请输入提现密码">
				<!-- #endif -->
				<!-- #ifdef MP-ALIPAY -->
				<input type="text" password v-model="password" class="with_password" placeholder="请输入提现密码">
				<!-- #endif -->
			</uni-popup-dialog>
		</uni-popup>
	</view>
</template>

<script>
	import Base64 from 'base-64';
	import { mapState } from 'vuex'
	import {throttle} from "lodash"
	export default {
		computed: {
			...mapState(['pubParam'])
		},
		data() {
			return {
				styRight: '76px',
				price: '',
				money: 0,
				dis: 0,
				mid: 0,
				vipdis: 0,
				content: '',
				sig: '',
				info: {
					discount: {
						discount: "",
						vipdiscount: ""
					},
					isvip: 0,
					logo: '',
					name: '',
					rate: 1
				},
				disInfo: {
					discount: []
				},
				password:'',
				isMi: false,
				openMi: true,//是否开启米券支付
				mpay: '',//使用米券数量
				isBusiness: true,//营业状态 
				code: ''
			}
		},
		onUnload() {
			var app = getApp();
			app.globalData.pubContent = '';
			app.globalData.pubSig = '';
		},
		async onLoad(option) {
			// #ifdef MP-WEIXIN || H5
			console.log('微信逻辑')
			if (option.q) {
				let scan_url = decodeURIComponent(option.q);
				this.content = this.gup('content', scan_url);
				this.sig = this.gup('sig', scan_url);
			} else {
				this.content = option.content;
				this.sig = option.sig;
			}
			uni.setStorageSync('mid', Base64.decode(this.content));
			this.mid=Base64.decode(this.content);
			if (option.code) {
				this.code = option.code;
			}
			this.getLocation();
			await this.$onLaunched;
			if(!uni.getStorageSync('token')){
				this.getToken();
			}else{
				this.getinfo();
			}
			// #endif
		},
		methods: {
			switch1Change(){
				if(this.price!=''){
					this.isMi = !this.isMi;
					if(!this.isMi){
						this.money = this.price;
						this.mpay = '';
					}else{
						this.mpay = this.info.feemoney;
						this.calculate('price',this.price);
					}
				}else{
					return this.$api.msg('请先输入金额');
				}
			},
			changeInput(e) {
				let value = e.detail.value;
				let right = value.length * 17 > 220 ? 220 : value.length * 17;
				right = value.length <= 0 ? 76 : right;
				this.styRight = right + 'px';
				if (this.price === '') {
					this.money = 0;
					this.dis = 0;
					this.vipdis = 0;
				} else {
					if (value.indexOf(".") < 0 && value != "") {
					    value = parseFloat(value);
					} else if (value.indexOf(".") == 0) {
						//'首位小数点情况'
					    value = value.replace(/[^$#$]/g, "0.");
					    value = value.replace(/\.{2,}/g, ".");
					} else if (!(/^(\d?)+(\.\d{0,2})?$/.test(value))) {
					    //去掉最后一位
					    value = value.substring(0, value.length - 1)
					}
					this.$nextTick(function() {
					    this.calculate('price',value);
					})
				}
			},
			changeInput2(e){
				let value = e.detail.value;
				if(value >= this.info.feemoney){
					value = this.info.feemoney;
				} 
				this.$nextTick(function() {
					if(this.mpay > 0){
						this.mpay = Number(value);
					}
					this.calculate('mpay',this.mpay);
				})
			},
			calculate(type,value){
				//'有小数点时，最大长度为7位，没有则是5位'
				if(type == 'price'){
					this.price = value;
				}else{
					this.mpay = value;
				}
				this.dis = (this.price * (this.info.rate / 100)).toFixed(2);
				// this.dis = (this.price * (10 - this.info.discount.discount) / 10).toFixed(2);
				// this.vipdis = (this.price * (10 - this.info.discount.vipdiscount) / 10).toFixed(2);	
				if(this.openMi&&this.isMi){
					if(this.price >= 1){//如果大于1，抵扣米券
						// 如果有小数点
						if((this.price+'').indexOf('.')!=-1){
							let trunc = this.price.split('.');
							if(trunc == this.mpay){//如相等，直接为0
								this.money = 0;
							}else if(trunc[0] < this.mpay){//如果支付金额小于米券，则用米券减去消费金额，并加上小数点位
								if(trunc[1].length==1){
									this.money = trunc[1]/10;
								}else if(trunc[1].length==2){
									this.money = trunc[1]/100;
								}
								this.mpay = trunc[0];
							}else{//如果支付金额大于米券，则用消费金额减去米券
								this.money = (this.price - this.mpay).toFixed(2);
							}
						}else{//整数
							if(this.price <= this.mpay){//支付金额小于米券
								this.money = 0;
								this.mpay = this.price;
							}else{
								this.money = (Math.trunc(this.price) - this.mpay).toFixed(2);
							}
						}
					}else{//如果小于1，不抵扣米券
						this.money = this.price;
						this.mpay = 0;
					}
				}else{
					this.money = this.price;
				}
			},
			getLocation(){
				let that = this;
				uni.getLocation({
					type: 'wgs84',
					altitude: true,
					success:res=> {
						console.log('成功',res)
						that.$store.commit('upLocation', {
							x: res.longitude,
							y: res.latitude
						})
						uni.setStorageSync('x',res.longitude);
						uni.setStorageSync('y',res.latitude);
						that.$isResolve();
					},
					fail:err=> {
						console.log('失败',err)
						that.$isResolve();
					},
					complete:com=> {
						console.log('失败',com)
						that.$isResolve();
					}
				});
			},
			getToken() {
				this.$axios('login/autoGzlogin', 'POST', 'member', {
					mid: this.mid,
					code: this.code,
					content: this.content,
					sig: this.sig
				}).then(res => {
					if (res.data.code == 300001) {
						this.$navTo(res.data.data);
					} else if (res.data.code == 200) {
						uni.setStorageSync('token', res.data.data);
						uni.setStorageSync('Jh_recotabshops', 1);
						this.getinfo();
					}
				})
			
			},
			// 绑定手机号
			getPhoneNumber() {
				my.getAuthCode({
				    scopes: 'auth_base',
				    success: res => {
						my.getPhoneNumber({
							success: (resMobile) => {
								let encryptedData = resMobile.response;
								this.$axios('Login/phoneLoginAlipay', "POST", 'member',  {
									code1: res.authCode,
									secureMobile: JSON.parse(encryptedData).response,
									mid: this.mid,
								}).then(res => {
									if (res.data.code == 200) {
										uni.setStorageSync('token', res.data.data);
										uni.setStorageSync('Jh_recotabshops', 1);
										this.getinfo();
										this.$refs.popupbind.close();
									}
								})
						  },
							fail: (res) => {
								console.log(res);
							},
						});
					}
				})
			},
			closeDialog(){
				this.$refs.inputDialog.close();
			},
			closeDia(){this.$refs.tixian.close();},
			getinfo() {
				var that = this;
				uni.showLoading({
					title: '加载中'
				})
				this.$axios('paytrans/display', 'POST', 'order', {
					content: this.content,
					sig: this.sig
				}).then(res => {
					uni.hideLoading();
					if (res.data.code == 200) {
						this.info = res.data.data;
						this.getDisInfo(this.info.uid);
						if(this.info.uid){
							this.isBusiness = true;
						}else{
							this.isBusiness = false;
						}
					}
					// else{
					// 	this.isBusiness = false;
					// }
				})
			},
			getDisInfo(uid) {
				this.$axios('supplierGoods/discountDesc', 'POST', 'shop', {
					uid,
				}).then(res => {
					if (res.data.code == 200) {
						this.disInfo = res.data.data;
					}
				})
			},
			
			gup(name, url) {
				if (!url) url = location.href;
				name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
				var regexS = "[\\?&]" + name + "=([^&#]*)";
				var regex = new RegExp(regexS);
				var results = regex.exec(url);
				return results == null ? null : results[1];
			},
			payMoney() {
				if (!uni.getStorageSync('token')) {
					this.$refs.popup.open();
					return;
				}
				let that = this;
				if (this.price === '' || this.price == 0) {
					this.$api.msg('请填写账单金额！')
					return;
				}
				if(this.openMi){
					if(this.money == 0){
						this.getPayWord();
						return;
					}else{
						this.realSubmit();
					}
				}else{
					this.realSubmit();
				}
			},
			getPayWord(){
				this.$axios('Info/paymain', "POST", 'member').then(res => {
					if (res.data.code = 200) {
						if(res.data.data.paypwd == ''){
							this.$api.msg('请先设置提现密码');
							setTimeout(() => {
								uni.navigateTo({
									url: '/pages/user/paypassword'
								})
							}, 1000);
							return;
						}else{
							this.$refs.tixian.open();
						}						
					}
				})
			},
			realSubmit:throttle(function(){
				let that = this;
				let paytype = 1;
				if(this.openMi){
					if(this.money==0 && this.password==''){
						return this.$api.msg('请输入提现密码');
					}
				}
				if(this.money==0){
					paytype = 3;
				}
				let obj = {
					type: paytype,
					content: this.content,
					sig: this.sig,
					money: this.money,
					price: this.price,
					paypwd: this.password,
					mpay: this.mpay ? this.mpay : 0,
					ismicredit: this.isMi&&this.mpay>0 ? 1 : 0,
				}
				uni.showLoading({
					title: '支付中'
				})
				this.$axios('paytrans/recharge', 'POST', 'order', obj).then(res => {
					if (res.data.code == 200) {
						let data = res.data.data;
						this.password = '';
						if(paytype==1){
							this.payment(data);
						} else if (paytype == 2) {
							this.$navTo('https://bph5.jinghushi.com/pay.html?goto=' + res.data.data)
						} else{
							that.$api.msg('支付成功');
							that.$refs.tixian.close();
							that.$navRed('/pages/money/paysucceed?paysn=' + data.paysn)
						}
					}
				})
			},5000,{
			  leading: true,
			  trailing: false
			}),
			payment(data) {
				var that = this;
				if (!that.isWechat()) {
					return;
				}
				if (typeof WeixinJSBridge == "undefined") {
					if (document.addEventListener) {
						document.addEventListener('WeixinJSBridgeReady', that.jsApiCall, false);
					} else if (document.attachEvent) {
						document.attachEvent('WeixinJSBridgeReady', that.jsApiCall);
						document.attachEvent('onWeixinJSBridgeReady', that.jsApiCall);
					}
				} else {
					that.jsApiCall(data);
				}
			},
			jsApiCall(data) {
				console.log(data)
				var that = this;
				//使用原生的，避免初始化appid问题
				WeixinJSBridge.invoke('getBrandWCPayRequest', {
					appId: data.appid,
					timeStamp: data.timestamp,
					nonceStr: data.noncestr, // 支付签名随机串，不长于 32 位  
					package: data.package, // 统一支付接口返回的prepay_id参数值，提交格式如：prepay_id=\*\*\*）  
					signType: data.signType, // 签名方式，默认为'SHA1'，使用新版支付需传入'MD5'  
					paySign: data.paySign, // 支付签名  
				},function(res) {
					console.log('---------',res)
					var msg = res.err_msg ? res.err_msg : res.errMsg;
					uni.showLoading({
						title:'支付中'
					})
					//WeixinJSBridge.log(msg); 
					if (res.err_msg == "get_brand_wcpay_request:ok") {
						uni.showToast({
							title: '支付成功',
							icon: 'none',
							duration: 1500
						})
						that.$navRed('/pages/money/paysucceed?paysn=' + data.paysn)
					} else {
						uni.showToast({
							title: '支付失败',
							icon: 'none',
							duration: 1500
						})
					}
				})
			},
			isWechat: function() {
				var ua = window.navigator.userAgent.toLowerCase();
				if (ua.match(/micromessenger/i) == 'micromessenger') {
					return true;
				} else {
					return false;
				}
			},
			cancleOrder(paysn) {
				this.$axios('paytrans/cancleorder', 'POST', 'order', {
					paysn:paysn
				}).then(res => {
					if (res.data.code == 200) {
						
					}
				})
			},
			openOnline(){
				let that = this;
				wx.openCustomerServiceChat({
					extInfo: {
						url: 'https://work.weixin.qq.com/kfid/kfc85558bf452926a1b',
					},
					corpId: 'ww818270697fafba52',
					fail(res) {
						that.$api.msg('打开失败请重试！');
					}
				})
			},
			goPhone(phone){
				uni.makePhoneCall({
					phoneNumber: phone //仅为示例
				});
			},
			getUserProfile(e) {
				let that = this;
				// #ifdef MP-WEIXIN
				uni.login({
					provider: 'weixin',
					success: function(loginRes) {
						let obj = e.detail;
						obj.code1 = loginRes.code;
						obj.mid = that.mid;
						that.$axios('login/xcxlogin', "POST", 'member', obj).then(
							res => {
								if (res.data.code == 200) {
									uni.setStorageSync('token', res.data.data);
									that.getinfo();
									that.$refs.popup.close();
								}else if(res.data.code==40001){
									that.$refs.inputDialog.open();
								}
							})
					},
					fail() {
						that.$api.msg('登录失败，请重试！')
					}
				})
				// #endif
			},
			dialogInputConfirm(value){
				let that = this;
				if(!value) return that.$api.msg('请输入推荐人ID');
				uni.login({
					provider: 'weixin',
					success: function(loginRes) {
						that.$axios('login/bindmid','POST','member',{
							code: loginRes.code,
							agentid: value
						}).then(res=>{
							if(res.data.code == 200){
								uni.setStorageSync('token', res.data.data);
								that.$refs.popup.close();
								that.$refs.inputDialog.close();
								that.payMoney();
							}
						})
					},
					fail() {
						that.$api.msg('登录失败，请重试！')
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	@import '/store/icon.css';

	page {
		background: #f2f2f2;
		color: #000000;
		font-size: 34upx;
	}
	.empower_getMoblie{
		background: #eee;
	}
	.popContent{
		text-align: center;
		background-color: #fff;
		border-radius: 20rpx;
		padding: 80rpx;
		line-height: 70rpx;
	}
	.popTip{
		padding-bottom: 20rpx;
		font-size: 32rpx;
	}
	.a_wp {
		// padding-bottom: 130upx;
	}
	.no_info{
		text-align: center;
		padding: 60rpx 0;
		font-size: 38rpx;
	}
	.pay_member {
		background: #fff;
		display: flex;
		padding: 20upx;

		.info {
			flex: 1;

			.title {
				text {
					display: inline-block;
					transform: scaleY(1.2);
					font-weight: bold;
					margin-right: 20upx;
				}

				text:nth-of-type(1) {
					color: #999;
					font-weight: normal;
				}
			}

			.grade_body {
				padding: 15upx 0;
			}

			.grade_body,
			.grade {
				display: flex;
				align-items: center;

				.grade {
					color: #8405dc;
					font-size: 28upx;
					font-weight: bold;

					.label {
						background: #000;
						border-radius: 10rpx;
						color: #f3dd91;
						padding: 6rpx 10rpx;
					}

					text {
						padding: 0 20rpx;
					}
				}

				.grade1 {
					.label {
						background: #000;
						color: #f3dd91;
						padding: 6rpx 10rpx;
					}
				}
			}

			.shop_label {
				font-size: 26upx;
				color: $bg-color;

				text {
					border: 1px $bg-color solid;
					border-radius: 6upx;
					display: inline-block;
					margin-right: 20upx;
					padding: 2upx 6upx;
					margin-bottom: 15rpx;
				}

				// text:nth-of-type(1) {
				// 	background: $bg-color;
				// 	color: #fff;
				// }
			}
		}

		.logo {
			border-radius: 10upx;
			height: 110upx;
			width: 110upx;
		}
	}

	.a_pay_wp {
		background: #fff;
		padding: 20upx;
	}

	.a_pay_user {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.a_p_userinfo {
		transform: scaleY(1.2);
		font-weight: bold;
	}

	.pay_name_title {
		color: $font-color-light;
		font-weight: normal;
		margin-right: 20rpx;
	}

	.pay_thumber {
		border-radius: 20upx;
		height: 110upx;
		margin-right: 40upx;
		width: 110upx;
	}

	.pay_message {
		color: $base-color;
		font-size: 30upx;
		transform: scaleY(1.2);
	}

	.pay_moeny {
		background-color: #FFFFFF;
		color: #000;
		margin: 10upx;
		padding: 0 20upx;

		.bill {
			border-bottom: 1px hsl(0, 0%, 87%) solid;
			padding-bottom: 20upx;

			.title {
				color: #999;
				padding-top: 20upx;
			}

			.money {
				display: flex;
				align-items: flex-end;

				.price {
					display: flex;
					justify-content: flex-end;
					flex: 1;
					transform: scaleY(1.2);
					padding-left: 20upx;
					position: relative;

					text {
						position: absolute;
						right: 76px;
						bottom: 5upx;
						font-size: 30upx;
						margin-right: 20upx;
						font-weight: bold;
					}

					input {
						font-size: 60rpx;
						height: 60rpx;
						/* #ifdef MP-ALIPAY */
						height: 80rpx;
						/* #endif */
						font-weight: bold;
						text-align: right;
						width: 220px;
					}

					/* #ifdef MP-WEIXIN */
					.price_input {
						transform: translateY(-10rpx);
					}
					/* #endif */
					.price_digit {
						font-size: 32upx;
						font-weight: normal;
					}
				}
			}
		}

		.member,
		.discount {
			border-bottom: 1px hsl(0, 0%, 87%) solid;
			padding: 20upx 0;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.price {
				color: #ba0000;
				// font-weight: bold;
				transform: scaleY(1.2);
			}
		}
		.member{
			input{
				text-align: right;
			}
		}
		.discount {
			border: none;

			.price {
				font-weight: normal;
				transform: scaleY(1);
			}

			.upgradation {
				color: #999;
				font-size: 28upx;
				margin-left: 15upx;
			}
		}
	}

	.pay_zhifu {
		background: #ffffff;
		font-weight: bold;
		margin: 10upx;
		text-align: right;
		padding: 20upx;

		text {
			display: inline-block;
			transform: scaleY(1.2);
		}

		.pay_color {
			font-size: 46upx;
			color: #ba0000;
		}
	}

	.pay_sumbit {
		text-align: center;
		margin-top: 30rpx;
		button {
			background: rgb(6, 135, 35);
			width: 70%;
			line-height: 85epx;
			border-radius: 25rpx;
			font-size: 30rpx;
			/* #ifdef MP-ALIPAY */
			margin: 0 auto;
			/* #endif */
		}
		text {
			color: #666;
			margin: 20rpx;
			font-size: 25rpx;
		}
	}

	// .pay_moeny text {
	// 	display: inline-block;
	// 	transform: scaleY(1.1);
	// }

	.pay_body {
		background-color: #FFFFFF;
		margin: 0 20upx;
		padding: 10upx;
	}

	.pay_li {
		font-weight: bold;
		transform: scaleY(1.2);
		padding: 20upx 0;
	}

	.pay_color {
		color: #FF0000;
		margin-left: 10upx;
	}

	.pay_li2,
	.pay_li4 {
		color: $font-color-base;
		font-size: $font-lg;
		font-weight: bolder;
		padding: 10upx 0;
	}

	.pay_input {
		height: 90upx;
		color: #000;
		border-bottom: 1px hsl(0, 0%, 87%) solid;
		font-size: 48upx;
		font-weight: bolder;
		padding-left: 30upx;
		position: relative;
		transform: scaleY(1.2);
	}

	.pay_input::before {
		content: '￥';
		color: #000;
		font-size: 30upx;
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-20%);
	}

	.pay_input_p {
		font-weight: normal;
	}

	.pay_li3 {
		color: $font-color-base;
		display: flex;
		align-items: center;
		padding: 10upx 0 0;
		font-size: 26upx;
	}

	.pay_li3 text {
		display: inline-block;
		transform: scaleY(1.2);
	}

	.pay_item {
		margin-right: 20upx;
		line-height: 55upx;
	}

	.pay_li4 {
		padding: 5upx 0;
		font-size: 24upx;
		transform: scaleY(1);
	}

	.pay_li4_text {
		display: inline-block;
		transform: scaleY(1.2);
	}

	.pay_checkbox {
		transform: scale(0.8);
		margin-left: 10upx;
	}

	.pay_li5 {
		color: $font-color-base;
		font-size: $font-sm;
	}



	.a_buttons {
		color: #fff;
		padding: 40upx 20upx 20upx;
	}

	.a_bs {
		border-radius: 40upx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 26upx;
		width: 100%;
		margin-top: 40upx;
		height: 70upx;
	}

	.a_bs .iconfont {
		font-size: 36upx;
		margin-right: 10upx;
	}

	.a_bs .icon-beike {
		margin: 0;
	}

	.wx {
		background: #04ae0f;
	}

	.zf {
		background: #15a9f1;
	}

	.bk {
		background: #AA5500;
	}
	.pay_tip{
		color: #666;
		font-size: 24rpx;
		padding: 10rpx 20rpx;
		// background: #fff;
		// margin: 0 10rpx;
	}
	.pay_tips{
		text-align: center;
		color: #565657;
		margin-top: 60rpx;
		font-size: 28rpx;
		.pay_link{
			display: flex;
			justify-content: center;
			color:  #1254C4;
			margin-top: 20rpx;
			align-items: center;
			.line{
				width: 2rpx;
				height: 30rpx;
				background: #565657;
				margin: 0 30rpx;
			}
		}
	}
</style>